/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.blitzcoder.collide.gui;

import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import de.blitzcoder.collide.icons.Icon;

/**
 *
 * @author blitzcoder
 */
public class TabPopupMenu extends JPopupMenu {

    JMenuItem closeAll;
    JMenuItem closeOther;
    JMenuItem close;
    //JMenuItem properties;

    public TabPopupMenu() {
        super();

        closeAll = new JMenuItem("Alle Dokumente schließen");
        closeOther = new JMenuItem("Alle anderen Dokumente schließen");
        close = new JMenuItem("Schließen");
        //properties = new JMenuItem("Eigenschaften");

        closeAll.setIcon(Icon.load("closetab_mouseover.png"));
        closeOther.setIcon(Icon.load("closetab_mouseover.png"));
        close.setIcon(Icon.load("closetab_mouseover.png"));
        //properties.setIcon(Icon.load("file_text.png"));

        add(closeAll);
        add(closeOther);
        addSeparator();
        add(close);
        //add(properties);
    }

    public void addCloseListener(ActionListener cl) {
        close.addActionListener(cl);
    }

    public void addCloseAllListener(ActionListener cl) {
        closeAll.addActionListener(cl);
    }

    public void addCloseOtherListener(ActionListener cl) {
        closeOther.addActionListener(cl);
    }

    //public void addPropertiesListener(ActionListener cl) {
    //    properties.addActionListener(cl);
    //}
}
